#ifndef RECTSUBCLASS_H
#define RECTSUBCLASS_H

#include <QtGui>
#include <QGraphicsRectItem>
class rectSubClass : public QObject,public QGraphicsRectItem
{
    Q_OBJECT
public:
    rectSubClass();
    rectSubClass(int no);
    rectSubClass(int no, int pathType);
    rectSubClass(int no, int pathNo, int pathType);
    int getMyParentPathType();
    int getMyParentPathNo();
signals:
    void abce_moved(int);
    void abcd_xyz_moved(qreal, qreal, int, int, int);
    void orphan_rect_moved(qreal, qreal,int, int, QPointF);
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
private:
    qreal currX, currY;
    int index;
    int myParentPathNo;
    int myParentPathType;
    bool isSelected;
    enum parentPathTypes {line=1,curve=2};
};

#endif // RECTSUBCLASS_H
